package com.brainhealth.customer.service.impl;

import java.util.List;
import com.brainhealth.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.brainhealth.customer.mapper.ExerciseOrderPayMapper;
import com.brainhealth.customer.domain.ExerciseOrderPay;
import com.brainhealth.customer.service.IExerciseOrderPayService;

/**
 * 训练订单支付日志Service业务层处理
 * 
 * @author wolong
 * @date 2023-06-08
 */
@Service
public class ExerciseOrderPayServiceImpl implements IExerciseOrderPayService 
{
    @Autowired
    private ExerciseOrderPayMapper exerciseOrderPayMapper;

    /**
     * 查询训练订单支付日志
     * 
     * @param exerciseOrderPayId 训练订单支付日志主键
     * @return 训练订单支付日志
     */
    @Override
    public ExerciseOrderPay selectExerciseOrderPayByExerciseOrderPayId(Long exerciseOrderPayId)
    {
        return exerciseOrderPayMapper.selectExerciseOrderPayByExerciseOrderPayId(exerciseOrderPayId);
    }

    /**
     * 查询训练订单支付日志列表
     * 
     * @param exerciseOrderPay 训练订单支付日志
     * @return 训练订单支付日志
     */
    @Override
    public List<ExerciseOrderPay> selectExerciseOrderPayList(ExerciseOrderPay exerciseOrderPay)
    {
        return exerciseOrderPayMapper.selectExerciseOrderPayList(exerciseOrderPay);
    }

    /**
     * 新增训练订单支付日志
     * 
     * @param exerciseOrderPay 训练订单支付日志
     * @return 结果
     */
    @Override
    public int insertExerciseOrderPay(ExerciseOrderPay exerciseOrderPay)
    {
        exerciseOrderPay.setCreateTime(DateUtils.getNowDate());
        return exerciseOrderPayMapper.insertExerciseOrderPay(exerciseOrderPay);
    }

    /**
     * 修改训练订单支付日志
     * 
     * @param exerciseOrderPay 训练订单支付日志
     * @return 结果
     */
    @Override
    public int updateExerciseOrderPay(ExerciseOrderPay exerciseOrderPay)
    {
        return exerciseOrderPayMapper.updateExerciseOrderPay(exerciseOrderPay);
    }

    /**
     * 批量删除训练订单支付日志
     * 
     * @param exerciseOrderPayIds 需要删除的训练订单支付日志主键
     * @return 结果
     */
    @Override
    public int deleteExerciseOrderPayByExerciseOrderPayIds(Long[] exerciseOrderPayIds)
    {
        return exerciseOrderPayMapper.deleteExerciseOrderPayByExerciseOrderPayIds(exerciseOrderPayIds);
    }

    /**
     * 删除训练订单支付日志信息
     * 
     * @param exerciseOrderPayId 训练订单支付日志主键
     * @return 结果
     */
    @Override
    public int deleteExerciseOrderPayByExerciseOrderPayId(Long exerciseOrderPayId)
    {
        return exerciseOrderPayMapper.deleteExerciseOrderPayByExerciseOrderPayId(exerciseOrderPayId);
    }
}
